package cn.tedu._03vehicle.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.*;

@Data
public class UserRegParam {
    //@NotNull(message = "用户名不能为null")
    //@NotEmpty(message="用户名不能为null和空字符串")
    //@NotBlank(message="用户名不能为null和空字符串和空白串")
   // @Size(min=6,max=10,message="用户名长度必须为6-10位")
    @Pattern(regexp="^(?:[A-Za-z]{0,14}|[\\u4e00-\\u9fa5]{0,7})$",message="用户名最长14个英文或7个汉字")
    @ApiModelProperty(value = "用户名",required = true)
    private String username;
    @ApiModelProperty(value = "密码",required = true)
    private String password;
    @Email(message="邮箱格式不正确")
    @ApiModelProperty(value = "邮箱",required = true)
    private String email;
    @ApiModelProperty(value = "手机号",required = true)
    private String phone;
}
